<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Core\Service;

use Doctrine\ORM\Mapping as ORM;
use Core\Entity;
use Doctrine\ORM\EntityManager;

class CategoriesService {

    protected $entityManager;

    /**
     * Sets the EntityManager
     *
     * @param EntityManager $em
     * @access protected
     * @return PostController
     */
    function __construct() {
//        print "In BaseClass constructor\n";
        //$objectManager = $this->getDoctrine()->getManager();
    }
    public function findAll(EntityManager $em) {
        
        $results= $em->createQuery('select u from Core\Entity\Categories u')->getArrayResult();
        
        
        return $results;
        
    }
}